<template>
  <div style="padding: 10px">
    <div style="display: flex; align-items: center; padding: 10px">
      <div style="width: 140px; font-weight: 700">输入防抖时间：</div>
      <el-input-number
        style="width: 240px"
        v-model="time"
        placeholder="防抖时间（毫秒）"
        :controls="false"
        @change="handleChange" />
    </div>
    <d-button color="#626aef" :time="time" @click="exportExcel">导出</d-button>
  </div>
</template>
<script setup lang="ts">
  import { ElMessage } from 'element-plus'
  import { ref } from 'vue'
  const time = ref(1000)
  const handleChange = val => {
    console.log('输入框的值：', val)
  }
  const exportExcel = () => {
    console.log('点击事件')
    ElMessage({
      message: '点击事件',
      type: 'success'
    })
  }
</script>
